let defaultCity = '上海'
try {
  if (localStorage.city) {
    defaultCity = localStorage.city
  }
} catch (e) {}

export default {
  city: defaultCity // 等价于city = localStorage.city || '上海'
}
// 1.默认state.city = '上海', 当存在localStorage.city时,state.city = localStorage.city
// 2.当点击时, state.city = 当前点击的city
